﻿using UnityEngine;
using System.Collections;
using DICE_GS;

public class RewardCardDeck : MonoBehaviour {
	public GameObject[] buttons;
	public GameObject[] cards;
	public GameObject[] unitCards;

	public RandomBoxSelectWindow window;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public void FoldEnd()
	{
		foreach(GameObject obj in buttons)
			obj.SetActive(false);
		foreach(GameObject obj in cards)
			obj.SetActive(true);
	}

	public void ShowingUnitCard(int index)
	{
		BoxCategory category = window.GetBoxCategoryByIndex(index);

		if( category == BoxCategory.UNIT )
		{
			unitCards[index].SetActive(true);
		}
	}

	public void HideUnitCard()
	{
		foreach(GameObject obj in unitCards)
			obj.SetActive(false);
	}
}
